﻿using System;

namespace Centido.Core
{
    /// <summary>
    ///   The event arguments used when receiving message from a running task.
    /// </summary>
    public class TaskMessageReceivedEventArgs : EventArgs
    {
        /// <summary>
        ///   Creates a new instance of the <see cref="Centido.Core.TaskMessageReceivedEventArgs"/> class.
        /// </summary>
        /// <param name="message">The received message.</param>
        /// <exception cref="ArgumentNullException">Thrown when the value of <paramref name="message"/> is null.</exception>
        public TaskMessageReceivedEventArgs(string message)
        {
            if (message == null)
                throw new ArgumentNullException("message");

            Message = message;
        }


        /// <summary>
        ///   Gets the received message.
        /// </summary>
        public string Message { get; private set; }
    }
}
